package com.itheima.admin.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.admin.dto.RoleDto;
import com.itheima.admin.pojo.Role;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface RoleMapper extends BaseMapper<Role> {
    int deleteRoleUser(@Param("roleId")String roleId);
    int deleteRoleModule(@Param("roleId")String roleId);
    int addRoleToModule(@Param("roleId")String roleId,@Param("moduleIds") List<String> moduleIds);

    @Select("select * from ss_role where role_id = #{id}")
    Role selectById(String id);


}
